import numpy as np
A=[[10, 34, 54, 23],
   [31, 87, 53, 68],
   [98, 49, 25, 11],
   [84, 32, 67, 88]]
A = np.pad(A, pad_width=1, mode='constant', constant_values=0) #这里参考了csdn上的pad用法
print(A)